/*
 * CServer.h
 *
 *  Created on: 25.07.2009
 *      Author: oli
 */

#ifndef CSERVER_H_
#define CSERVER_H_

#define MAX_CLIENTS 16
#define SERVER_PORT 60000

#include "../../../raknet/Source/RakNetworkFactory.h"
#include "../../../raknet/Source/RakPeerInterface.h"
#include "../../../raknet/Source/MessageIdentifiers.h"
#include "../GUI/IGUICallback.h"
#include "CServerNetworkObj.h"

#ifndef __gnu_linux__
#include <windows.h>
#include <SDL_thread.h>
#include <SDL_mutex.h>
#else
#include <SDL.h>
#endif



class CServer
{
private:
	RakPeerInterface* m_pServer;
	SDL_Thread* m_pPollThread;
	IGUICallback* m_pConfigDialog;
	bool m_bServerstarted;
	//CServerNetworkObj* m_pServerObj;

public:
	CServer();
	~CServer();
	int RunPolling(void *data);
	bool RunServer(int port);
	void SetCallbackGUI(IGUICallback* CallbackGUI);
};

#endif /* CSERVER_H_ */
